#ifndef HELICTRLPANEL_H
#define HELICTRLPANEL_H

#include "HeliCtrl_GUI.h"

#define TELEMETRY_TIMER_ID 10001

typedef struct wxVertex2D
{
public:
	wxVertex2D(double xx = 0, double yy = 0) : x(xx),y(yy) {}	
	double x,y;
}wxVertex2D;

class HeliCtrlPanel : public MainPanel
{
public:
	HeliCtrlPanel( wxWindow* parent );
	~HeliCtrlPanel();

protected:
	void OnSoftJoy( wxJoystickEvent& event );
	void OnJoystickButtonEvent(int Button, bool Down);
	void OnOK( wxCommandEvent& event );
	void PortOpen_ButtonClick( wxCommandEvent& event );
	void OnTelemetryTimer(wxTimerEvent& event);
	void OnBeepBtn( wxCommandEvent& event );

protected:
	wxVertex2D PrescaleToPercentx10(wxPoint &point);

private:
	wxTimer m_TelemetryTimer;
	wxPoint m_PrevJoyPos;

	DECLARE_EVENT_TABLE();
};

#endif //HELICTRLPANEL_H